/*
 * This class provide access to JFrame it implement the tearDown method
 * 
 */
import junit.framework.TestCase;

import javax.swing.*;
/**
 *
 * @author ghassan
 */


public class SwingTestCase extends TestCase {
    private JFrame testFrame;

    @Override
    protected void tearDown(  ) throws Exception {
        if (this.testFrame != null) {
            this.testFrame.dispose(  );
            this.testFrame = null;
        }
    }

    public JFrame getTestFrame(  ) {
        if (this.testFrame == null) {
            this.testFrame = new JFrame("Test");
        }
        return this.testFrame;
    }
}
